﻿#ifndef URLDELEGATE_H_
#define URLDELEGATE_H_

#include <QStyledItemDelegate>
#include <QCheckBox>
#include <QStyleOption>
#include <QApplication>
#include <QMouseEvent>
#include <QPainter>




class UrlDelegate : public QStyledItemDelegate
{
	Q_OBJECT
private:

signals:
	void requestOpenUrl(const QModelIndex& index);

public:
	UrlDelegate(QObject* parent = nullptr);

protected:
	void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
	bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& index) override;
};


#endif // !URLDELEGATE_H_
